{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "# The usual preamble\n",
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "# Make the graphs a bit prettier, and bigger\n",
    "plt.style.use('ggplot')\n",
    "plt.rcParams['figure.figsize'] = (15, 5)\n",
    "\n",
    "# This is necessary to show lots of columns in pandas 0.12. \n",
    "# Not necessary in pandas 0.13.\n",
    "pd.set_option('display.width', 5000) \n",
    "pd.set_option('display.max_columns', 60)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's continue with our NYC 311 service requests example."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [],
   "source": [
    "# because of mixed types we specify dtype to prevent any errors\n",
    "complaints = pd.read_csv('../data/311-service-requests.csv', dtype='unicode')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 3.1 Selecting only noise complaints"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "I'd like to know which borough has the most noise complaints. First, we'll take a look at the data to see what it looks like:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unique Key</th>\n",
       "      <th>Created Date</th>\n",
       "      <th>Closed Date</th>\n",
       "      <th>Agency</th>\n",
       "      <th>Agency Name</th>\n",
       "      <th>Complaint Type</th>\n",
       "      <th>Descriptor</th>\n",
       "      <th>Location Type</th>\n",
       "      <th>Incident Zip</th>\n",
       "      <th>Incident Address</th>\n",
       "      <th>Street Name</th>\n",
       "      <th>Cross Street 1</th>\n",
       "      <th>Cross Street 2</th>\n",
       "      <th>Intersection Street 1</th>\n",
       "      <th>Intersection Street 2</th>\n",
       "      <th>Address Type</th>\n",
       "      <th>City</th>\n",
       "      <th>Landmark</th>\n",
       "      <th>Facility Type</th>\n",
       "      <th>Status</th>\n",
       "      <th>Due Date</th>\n",
       "      <th>Resolution Action Updated Date</th>\n",
       "      <th>Community Board</th>\n",
       "      <th>Borough</th>\n",
       "      <th>X Coordinate (State Plane)</th>\n",
       "      <th>Y Coordinate (State Plane)</th>\n",
       "      <th>Park Facility Name</th>\n",
       "      <th>Park Borough</th>\n",
       "      <th>School Name</th>\n",
       "      <th>School Number</th>\n",
       "      <th>School Region</th>\n",
       "      <th>School Code</th>\n",
       "      <th>School Phone Number</th>\n",
       "      <th>School Address</th>\n",
       "      <th>School City</th>\n",
       "      <th>School State</th>\n",
       "      <th>School Zip</th>\n",
       "      <th>School Not Found</th>\n",
       "      <th>School or Citywide Complaint</th>\n",
       "      <th>Vehicle Type</th>\n",
       "      <th>Taxi Company Borough</th>\n",
       "      <th>Taxi Pick Up Location</th>\n",
       "      <th>Bridge Highway Name</th>\n",
       "      <th>Bridge Highway Direction</th>\n",
       "      <th>Road Ramp</th>\n",
       "      <th>Bridge Highway Segment</th>\n",
       "      <th>Garage Lot Name</th>\n",
       "      <th>Ferry Direction</th>\n",
       "      <th>Ferry Terminal Name</th>\n",
       "      <th>Latitude</th>\n",
       "      <th>Longitude</th>\n",
       "      <th>Location</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>26589651</td>\n",
       "      <td>10/31/2013 02:08:41 AM</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>Loud Talking</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>11432</td>\n",
       "      <td>90-03 169 STREET</td>\n",
       "      <td>169 STREET</td>\n",
       "      <td>90 AVENUE</td>\n",
       "      <td>91 AVENUE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ADDRESS</td>\n",
       "      <td>JAMAICA</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Assigned</td>\n",
       "      <td>10/31/2013 10:08:41 AM</td>\n",
       "      <td>10/31/2013 02:35:17 AM</td>\n",
       "      <td>12 QUEENS</td>\n",
       "      <td>QUEENS</td>\n",
       "      <td>1042027.0</td>\n",
       "      <td>197389.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>QUEENS</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.708275</td>\n",
       "      <td>-73.791604</td>\n",
       "      <td>(40.70827532593202, -73.79160395779721)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>26593698</td>\n",
       "      <td>10/31/2013 02:01:04 AM</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Illegal Parking</td>\n",
       "      <td>Commercial Overnight Parking</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>11378</td>\n",
       "      <td>58 AVENUE</td>\n",
       "      <td>58 AVENUE</td>\n",
       "      <td>58 PLACE</td>\n",
       "      <td>59 STREET</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>BLOCKFACE</td>\n",
       "      <td>MASPETH</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Open</td>\n",
       "      <td>10/31/2013 10:01:04 AM</td>\n",
       "      <td>NaN</td>\n",
       "      <td>05 QUEENS</td>\n",
       "      <td>QUEENS</td>\n",
       "      <td>1009349.0</td>\n",
       "      <td>201984.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>QUEENS</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.721041</td>\n",
       "      <td>-73.909453</td>\n",
       "      <td>(40.721040535628305, -73.90945306791765)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>26594139</td>\n",
       "      <td>10/31/2013 02:00:24 AM</td>\n",
       "      <td>10/31/2013 02:40:32 AM</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Commercial</td>\n",
       "      <td>Loud Music/Party</td>\n",
       "      <td>Club/Bar/Restaurant</td>\n",
       "      <td>10032</td>\n",
       "      <td>4060 BROADWAY</td>\n",
       "      <td>BROADWAY</td>\n",
       "      <td>WEST 171 STREET</td>\n",
       "      <td>WEST 172 STREET</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ADDRESS</td>\n",
       "      <td>NEW YORK</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Closed</td>\n",
       "      <td>10/31/2013 10:00:24 AM</td>\n",
       "      <td>10/31/2013 02:39:42 AM</td>\n",
       "      <td>12 MANHATTAN</td>\n",
       "      <td>MANHATTAN</td>\n",
       "      <td>1001088.0</td>\n",
       "      <td>246531.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>MANHATTAN</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.843330</td>\n",
       "      <td>-73.939144</td>\n",
       "      <td>(40.84332975466513, -73.93914371913482)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>26595721</td>\n",
       "      <td>10/31/2013 01:56:23 AM</td>\n",
       "      <td>10/31/2013 02:21:48 AM</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Vehicle</td>\n",
       "      <td>Car/Truck Horn</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>10023</td>\n",
       "      <td>WEST 72 STREET</td>\n",
       "      <td>WEST 72 STREET</td>\n",
       "      <td>COLUMBUS AVENUE</td>\n",
       "      <td>AMSTERDAM AVENUE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>BLOCKFACE</td>\n",
       "      <td>NEW YORK</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Closed</td>\n",
       "      <td>10/31/2013 09:56:23 AM</td>\n",
       "      <td>10/31/2013 02:21:10 AM</td>\n",
       "      <td>07 MANHATTAN</td>\n",
       "      <td>MANHATTAN</td>\n",
       "      <td>989730.0</td>\n",
       "      <td>222727.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>MANHATTAN</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.778009</td>\n",
       "      <td>-73.980213</td>\n",
       "      <td>(40.7780087446372, -73.98021349023975)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>26590930</td>\n",
       "      <td>10/31/2013 01:53:44 AM</td>\n",
       "      <td>NaN</td>\n",
       "      <td>DOHMH</td>\n",
       "      <td>Department of Health and Mental Hygiene</td>\n",
       "      <td>Rodent</td>\n",
       "      <td>Condition Attracting Rodents</td>\n",
       "      <td>Vacant Lot</td>\n",
       "      <td>10027</td>\n",
       "      <td>WEST 124 STREET</td>\n",
       "      <td>WEST 124 STREET</td>\n",
       "      <td>LENOX AVENUE</td>\n",
       "      <td>ADAM CLAYTON POWELL JR BOULEVARD</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>BLOCKFACE</td>\n",
       "      <td>NEW YORK</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Pending</td>\n",
       "      <td>11/30/2013 01:53:44 AM</td>\n",
       "      <td>10/31/2013 01:59:54 AM</td>\n",
       "      <td>10 MANHATTAN</td>\n",
       "      <td>MANHATTAN</td>\n",
       "      <td>998815.0</td>\n",
       "      <td>233545.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>MANHATTAN</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.807691</td>\n",
       "      <td>-73.947387</td>\n",
       "      <td>(40.80769092704951, -73.94738703491433)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Unique Key            Created Date             Closed Date Agency                              Agency Name           Complaint Type                    Descriptor        Location Type Incident Zip  Incident Address      Street Name   Cross Street 1                    Cross Street 2 Intersection Street 1 Intersection Street 2 Address Type      City Landmark Facility Type    Status                Due Date Resolution Action Updated Date Community Board    Borough  X Coordinate (State Plane)  Y Coordinate (State Plane) Park Facility Name Park Borough  School Name School Number School Region  School Code School Phone Number School Address  School City School State   School Zip School Not Found  School or Citywide Complaint Vehicle Type Taxi Company Borough Taxi Pick Up Location Bridge Highway Name Bridge Highway Direction Road Ramp Bridge Highway Segment Garage Lot Name Ferry Direction Ferry Terminal Name   Latitude  Longitude                                  Location\n",
       "0    26589651  10/31/2013 02:08:41 AM                     NaN   NYPD          New York City Police Department  Noise - Street/Sidewalk                  Loud Talking      Street/Sidewalk        11432  90-03 169 STREET       169 STREET        90 AVENUE                         91 AVENUE                   NaN                   NaN      ADDRESS   JAMAICA      NaN      Precinct  Assigned  10/31/2013 10:08:41 AM         10/31/2013 02:35:17 AM       12 QUEENS     QUEENS                   1042027.0                    197389.0        Unspecified       QUEENS  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.708275 -73.791604   (40.70827532593202, -73.79160395779721)\n",
       "1    26593698  10/31/2013 02:01:04 AM                     NaN   NYPD          New York City Police Department          Illegal Parking  Commercial Overnight Parking      Street/Sidewalk        11378         58 AVENUE        58 AVENUE         58 PLACE                         59 STREET                   NaN                   NaN    BLOCKFACE   MASPETH      NaN      Precinct      Open  10/31/2013 10:01:04 AM                            NaN       05 QUEENS     QUEENS                   1009349.0                    201984.0        Unspecified       QUEENS  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.721041 -73.909453  (40.721040535628305, -73.90945306791765)\n",
       "2    26594139  10/31/2013 02:00:24 AM  10/31/2013 02:40:32 AM   NYPD          New York City Police Department       Noise - Commercial              Loud Music/Party  Club/Bar/Restaurant        10032     4060 BROADWAY         BROADWAY  WEST 171 STREET                   WEST 172 STREET                   NaN                   NaN      ADDRESS  NEW YORK      NaN      Precinct    Closed  10/31/2013 10:00:24 AM         10/31/2013 02:39:42 AM    12 MANHATTAN  MANHATTAN                   1001088.0                    246531.0        Unspecified    MANHATTAN  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.843330 -73.939144   (40.84332975466513, -73.93914371913482)\n",
       "3    26595721  10/31/2013 01:56:23 AM  10/31/2013 02:21:48 AM   NYPD          New York City Police Department          Noise - Vehicle                Car/Truck Horn      Street/Sidewalk        10023    WEST 72 STREET   WEST 72 STREET  COLUMBUS AVENUE                  AMSTERDAM AVENUE                   NaN                   NaN    BLOCKFACE  NEW YORK      NaN      Precinct    Closed  10/31/2013 09:56:23 AM         10/31/2013 02:21:10 AM    07 MANHATTAN  MANHATTAN                    989730.0                    222727.0        Unspecified    MANHATTAN  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.778009 -73.980213    (40.7780087446372, -73.98021349023975)\n",
       "4    26590930  10/31/2013 01:53:44 AM                     NaN  DOHMH  Department of Health and Mental Hygiene                   Rodent  Condition Attracting Rodents           Vacant Lot        10027   WEST 124 STREET  WEST 124 STREET     LENOX AVENUE  ADAM CLAYTON POWELL JR BOULEVARD                   NaN                   NaN    BLOCKFACE  NEW YORK      NaN           NaN   Pending  11/30/2013 01:53:44 AM         10/31/2013 01:59:54 AM    10 MANHATTAN  MANHATTAN                    998815.0                    233545.0        Unspecified    MANHATTAN  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.807691 -73.947387   (40.80769092704951, -73.94738703491433)"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "complaints[:5]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To get the noise complaints, we need to find the rows where the \"Complaint Type\" column is \"Noise - Street/Sidewalk\". I'll show you how to do that, and then explain what's going on."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unique Key</th>\n",
       "      <th>Created Date</th>\n",
       "      <th>Closed Date</th>\n",
       "      <th>Agency</th>\n",
       "      <th>Agency Name</th>\n",
       "      <th>Complaint Type</th>\n",
       "      <th>Descriptor</th>\n",
       "      <th>Location Type</th>\n",
       "      <th>Incident Zip</th>\n",
       "      <th>Incident Address</th>\n",
       "      <th>Street Name</th>\n",
       "      <th>Cross Street 1</th>\n",
       "      <th>Cross Street 2</th>\n",
       "      <th>Intersection Street 1</th>\n",
       "      <th>Intersection Street 2</th>\n",
       "      <th>Address Type</th>\n",
       "      <th>City</th>\n",
       "      <th>Landmark</th>\n",
       "      <th>Facility Type</th>\n",
       "      <th>Status</th>\n",
       "      <th>Due Date</th>\n",
       "      <th>Resolution Action Updated Date</th>\n",
       "      <th>Community Board</th>\n",
       "      <th>Borough</th>\n",
       "      <th>X Coordinate (State Plane)</th>\n",
       "      <th>Y Coordinate (State Plane)</th>\n",
       "      <th>Park Facility Name</th>\n",
       "      <th>Park Borough</th>\n",
       "      <th>School Name</th>\n",
       "      <th>School Number</th>\n",
       "      <th>School Region</th>\n",
       "      <th>School Code</th>\n",
       "      <th>School Phone Number</th>\n",
       "      <th>School Address</th>\n",
       "      <th>School City</th>\n",
       "      <th>School State</th>\n",
       "      <th>School Zip</th>\n",
       "      <th>School Not Found</th>\n",
       "      <th>School or Citywide Complaint</th>\n",
       "      <th>Vehicle Type</th>\n",
       "      <th>Taxi Company Borough</th>\n",
       "      <th>Taxi Pick Up Location</th>\n",
       "      <th>Bridge Highway Name</th>\n",
       "      <th>Bridge Highway Direction</th>\n",
       "      <th>Road Ramp</th>\n",
       "      <th>Bridge Highway Segment</th>\n",
       "      <th>Garage Lot Name</th>\n",
       "      <th>Ferry Direction</th>\n",
       "      <th>Ferry Terminal Name</th>\n",
       "      <th>Latitude</th>\n",
       "      <th>Longitude</th>\n",
       "      <th>Location</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>26589651</td>\n",
       "      <td>10/31/2013 02:08:41 AM</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>Loud Talking</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>11432</td>\n",
       "      <td>90-03 169 STREET</td>\n",
       "      <td>169 STREET</td>\n",
       "      <td>90 AVENUE</td>\n",
       "      <td>91 AVENUE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ADDRESS</td>\n",
       "      <td>JAMAICA</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Assigned</td>\n",
       "      <td>10/31/2013 10:08:41 AM</td>\n",
       "      <td>10/31/2013 02:35:17 AM</td>\n",
       "      <td>12 QUEENS</td>\n",
       "      <td>QUEENS</td>\n",
       "      <td>1042027.0</td>\n",
       "      <td>197389.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>QUEENS</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.708275</td>\n",
       "      <td>-73.791604</td>\n",
       "      <td>(40.70827532593202, -73.79160395779721)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>26594086</td>\n",
       "      <td>10/31/2013 12:54:03 AM</td>\n",
       "      <td>10/31/2013 02:16:39 AM</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>Loud Music/Party</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>10310</td>\n",
       "      <td>173 CAMPBELL AVENUE</td>\n",
       "      <td>CAMPBELL AVENUE</td>\n",
       "      <td>HENDERSON AVENUE</td>\n",
       "      <td>WINEGAR LANE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ADDRESS</td>\n",
       "      <td>STATEN ISLAND</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Closed</td>\n",
       "      <td>10/31/2013 08:54:03 AM</td>\n",
       "      <td>10/31/2013 02:07:14 AM</td>\n",
       "      <td>01 STATEN ISLAND</td>\n",
       "      <td>STATEN ISLAND</td>\n",
       "      <td>952013.0</td>\n",
       "      <td>171076.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>STATEN ISLAND</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.636182</td>\n",
       "      <td>-74.116150</td>\n",
       "      <td>(40.63618202176914, -74.1161500428337)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>26591573</td>\n",
       "      <td>10/31/2013 12:35:18 AM</td>\n",
       "      <td>10/31/2013 02:41:35 AM</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>Loud Talking</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>10312</td>\n",
       "      <td>24 PRINCETON LANE</td>\n",
       "      <td>PRINCETON LANE</td>\n",
       "      <td>HAMPTON GREEN</td>\n",
       "      <td>DEAD END</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ADDRESS</td>\n",
       "      <td>STATEN ISLAND</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Closed</td>\n",
       "      <td>10/31/2013 08:35:18 AM</td>\n",
       "      <td>10/31/2013 01:45:17 AM</td>\n",
       "      <td>03 STATEN ISLAND</td>\n",
       "      <td>STATEN ISLAND</td>\n",
       "      <td>929577.0</td>\n",
       "      <td>140964.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>STATEN ISLAND</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.553421</td>\n",
       "      <td>-74.196743</td>\n",
       "      <td>(40.55342078716953, -74.19674315017886)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Unique Key            Created Date             Closed Date Agency                      Agency Name           Complaint Type        Descriptor    Location Type Incident Zip     Incident Address      Street Name    Cross Street 1 Cross Street 2 Intersection Street 1 Intersection Street 2 Address Type           City Landmark Facility Type    Status                Due Date Resolution Action Updated Date   Community Board        Borough  X Coordinate (State Plane)  Y Coordinate (State Plane) Park Facility Name   Park Borough  School Name School Number School Region  School Code School Phone Number School Address  School City School State   School Zip School Not Found  School or Citywide Complaint Vehicle Type Taxi Company Borough Taxi Pick Up Location Bridge Highway Name Bridge Highway Direction Road Ramp Bridge Highway Segment Garage Lot Name Ferry Direction Ferry Terminal Name   Latitude  Longitude                                 Location\n",
       "0     26589651  10/31/2013 02:08:41 AM                     NaN   NYPD  New York City Police Department  Noise - Street/Sidewalk      Loud Talking  Street/Sidewalk        11432     90-03 169 STREET       169 STREET         90 AVENUE      91 AVENUE                   NaN                   NaN      ADDRESS        JAMAICA      NaN      Precinct  Assigned  10/31/2013 10:08:41 AM         10/31/2013 02:35:17 AM         12 QUEENS         QUEENS                   1042027.0                    197389.0        Unspecified         QUEENS  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.708275 -73.791604  (40.70827532593202, -73.79160395779721)\n",
       "16    26594086  10/31/2013 12:54:03 AM  10/31/2013 02:16:39 AM   NYPD  New York City Police Department  Noise - Street/Sidewalk  Loud Music/Party  Street/Sidewalk        10310  173 CAMPBELL AVENUE  CAMPBELL AVENUE  HENDERSON AVENUE   WINEGAR LANE                   NaN                   NaN      ADDRESS  STATEN ISLAND      NaN      Precinct    Closed  10/31/2013 08:54:03 AM         10/31/2013 02:07:14 AM  01 STATEN ISLAND  STATEN ISLAND                    952013.0                    171076.0        Unspecified  STATEN ISLAND  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.636182 -74.116150   (40.63618202176914, -74.1161500428337)\n",
       "25    26591573  10/31/2013 12:35:18 AM  10/31/2013 02:41:35 AM   NYPD  New York City Police Department  Noise - Street/Sidewalk      Loud Talking  Street/Sidewalk        10312    24 PRINCETON LANE   PRINCETON LANE     HAMPTON GREEN       DEAD END                   NaN                   NaN      ADDRESS  STATEN ISLAND      NaN      Precinct    Closed  10/31/2013 08:35:18 AM         10/31/2013 01:45:17 AM  03 STATEN ISLAND  STATEN ISLAND                    929577.0                    140964.0        Unspecified  STATEN ISLAND  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.553421 -74.196743  (40.55342078716953, -74.19674315017886)"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "noise_complaints = complaints[complaints['Complaint Type'] == \"Noise - Street/Sidewalk\"]\n",
    "noise_complaints[:3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If you look at `noise_complaints`, you'll see that this worked, and it only contains complaints with the right complaint type. But how does this work? Let's deconstruct it into two pieces"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0          True\n",
       "1         False\n",
       "2         False\n",
       "3         False\n",
       "4         False\n",
       "          ...  \n",
       "111064    False\n",
       "111065    False\n",
       "111066     True\n",
       "111067    False\n",
       "111068    False\n",
       "Name: Complaint Type, Length: 111069, dtype: bool"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "complaints['Complaint Type'] == \"Noise - Street/Sidewalk\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This is a big array of `True`s and `False`s, one for each row in our dataframe. When we index our dataframe with this array, we get just the rows where our boolean array evaluated to `True`.  It's important to note that for row filtering by a boolean array the length of our dataframe's index must be the same length as the boolean array used for filtering.\n",
    "\n",
    "You can also combine more than one condition with the `&` operator like this:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unique Key</th>\n",
       "      <th>Created Date</th>\n",
       "      <th>Closed Date</th>\n",
       "      <th>Agency</th>\n",
       "      <th>Agency Name</th>\n",
       "      <th>Complaint Type</th>\n",
       "      <th>Descriptor</th>\n",
       "      <th>Location Type</th>\n",
       "      <th>Incident Zip</th>\n",
       "      <th>Incident Address</th>\n",
       "      <th>Street Name</th>\n",
       "      <th>Cross Street 1</th>\n",
       "      <th>Cross Street 2</th>\n",
       "      <th>Intersection Street 1</th>\n",
       "      <th>Intersection Street 2</th>\n",
       "      <th>Address Type</th>\n",
       "      <th>City</th>\n",
       "      <th>Landmark</th>\n",
       "      <th>Facility Type</th>\n",
       "      <th>Status</th>\n",
       "      <th>Due Date</th>\n",
       "      <th>Resolution Action Updated Date</th>\n",
       "      <th>Community Board</th>\n",
       "      <th>Borough</th>\n",
       "      <th>X Coordinate (State Plane)</th>\n",
       "      <th>Y Coordinate (State Plane)</th>\n",
       "      <th>Park Facility Name</th>\n",
       "      <th>Park Borough</th>\n",
       "      <th>School Name</th>\n",
       "      <th>School Number</th>\n",
       "      <th>School Region</th>\n",
       "      <th>School Code</th>\n",
       "      <th>School Phone Number</th>\n",
       "      <th>School Address</th>\n",
       "      <th>School City</th>\n",
       "      <th>School State</th>\n",
       "      <th>School Zip</th>\n",
       "      <th>School Not Found</th>\n",
       "      <th>School or Citywide Complaint</th>\n",
       "      <th>Vehicle Type</th>\n",
       "      <th>Taxi Company Borough</th>\n",
       "      <th>Taxi Pick Up Location</th>\n",
       "      <th>Bridge Highway Name</th>\n",
       "      <th>Bridge Highway Direction</th>\n",
       "      <th>Road Ramp</th>\n",
       "      <th>Bridge Highway Segment</th>\n",
       "      <th>Garage Lot Name</th>\n",
       "      <th>Ferry Direction</th>\n",
       "      <th>Ferry Terminal Name</th>\n",
       "      <th>Latitude</th>\n",
       "      <th>Longitude</th>\n",
       "      <th>Location</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>26595564</td>\n",
       "      <td>10/31/2013 12:30:36 AM</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>Loud Music/Party</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>11236</td>\n",
       "      <td>AVENUE J</td>\n",
       "      <td>AVENUE J</td>\n",
       "      <td>EAST 80 STREET</td>\n",
       "      <td>EAST 81 STREET</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>BLOCKFACE</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Open</td>\n",
       "      <td>10/31/2013 08:30:36 AM</td>\n",
       "      <td>NaN</td>\n",
       "      <td>18 BROOKLYN</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>1008937.0</td>\n",
       "      <td>170310.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.634104</td>\n",
       "      <td>-73.911055</td>\n",
       "      <td>(40.634103775951736, -73.91105541883589)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>26595553</td>\n",
       "      <td>10/31/2013 12:05:10 AM</td>\n",
       "      <td>10/31/2013 02:43:43 AM</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>Loud Talking</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>11225</td>\n",
       "      <td>25 LEFFERTS AVENUE</td>\n",
       "      <td>LEFFERTS AVENUE</td>\n",
       "      <td>WASHINGTON AVENUE</td>\n",
       "      <td>BEDFORD AVENUE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ADDRESS</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Closed</td>\n",
       "      <td>10/31/2013 08:05:10 AM</td>\n",
       "      <td>10/31/2013 01:29:29 AM</td>\n",
       "      <td>09 BROOKLYN</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>995366.0</td>\n",
       "      <td>180388.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.661793</td>\n",
       "      <td>-73.959934</td>\n",
       "      <td>(40.6617931276793, -73.95993363978067)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>109</th>\n",
       "      <td>26594653</td>\n",
       "      <td>10/30/2013 11:26:32 PM</td>\n",
       "      <td>10/31/2013 12:18:54 AM</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>Loud Music/Party</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>11222</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>DOBBIN STREET</td>\n",
       "      <td>NORMAN STREET</td>\n",
       "      <td>INTERSECTION</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Closed</td>\n",
       "      <td>10/31/2013 07:26:32 AM</td>\n",
       "      <td>10/31/2013 12:18:54 AM</td>\n",
       "      <td>01 BROOKLYN</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>996925.0</td>\n",
       "      <td>203271.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.724600</td>\n",
       "      <td>-73.954271</td>\n",
       "      <td>(40.724599563793525, -73.95427134534344)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>236</th>\n",
       "      <td>26591992</td>\n",
       "      <td>10/30/2013 10:02:58 PM</td>\n",
       "      <td>10/30/2013 10:23:20 PM</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>Loud Talking</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>11218</td>\n",
       "      <td>DITMAS AVENUE</td>\n",
       "      <td>DITMAS AVENUE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>LATLONG</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Closed</td>\n",
       "      <td>10/31/2013 06:02:58 AM</td>\n",
       "      <td>10/30/2013 10:23:20 PM</td>\n",
       "      <td>01 BROOKLYN</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>991895.0</td>\n",
       "      <td>171051.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.636169</td>\n",
       "      <td>-73.972455</td>\n",
       "      <td>(40.63616876563881, -73.97245504682485)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>370</th>\n",
       "      <td>26594167</td>\n",
       "      <td>10/30/2013 08:38:25 PM</td>\n",
       "      <td>10/30/2013 10:26:28 PM</td>\n",
       "      <td>NYPD</td>\n",
       "      <td>New York City Police Department</td>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>Loud Music/Party</td>\n",
       "      <td>Street/Sidewalk</td>\n",
       "      <td>11218</td>\n",
       "      <td>126 BEVERLY ROAD</td>\n",
       "      <td>BEVERLY ROAD</td>\n",
       "      <td>CHURCH AVENUE</td>\n",
       "      <td>EAST 2 STREET</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ADDRESS</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Precinct</td>\n",
       "      <td>Closed</td>\n",
       "      <td>10/31/2013 04:38:25 AM</td>\n",
       "      <td>10/30/2013 10:26:28 PM</td>\n",
       "      <td>12 BROOKLYN</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>990144.0</td>\n",
       "      <td>173511.0</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>Unspecified</td>\n",
       "      <td>N</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40.642922</td>\n",
       "      <td>-73.978762</td>\n",
       "      <td>(40.6429222774404, -73.97876175474585)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Unique Key            Created Date             Closed Date Agency                      Agency Name           Complaint Type        Descriptor    Location Type Incident Zip    Incident Address      Street Name     Cross Street 1  Cross Street 2 Intersection Street 1 Intersection Street 2  Address Type      City Landmark Facility Type  Status                Due Date Resolution Action Updated Date Community Board   Borough  X Coordinate (State Plane)  Y Coordinate (State Plane) Park Facility Name Park Borough  School Name School Number School Region  School Code School Phone Number School Address  School City School State   School Zip School Not Found  School or Citywide Complaint Vehicle Type Taxi Company Borough Taxi Pick Up Location Bridge Highway Name Bridge Highway Direction Road Ramp Bridge Highway Segment Garage Lot Name Ferry Direction Ferry Terminal Name   Latitude  Longitude                                  Location\n",
       "31     26595564  10/31/2013 12:30:36 AM                     NaN   NYPD  New York City Police Department  Noise - Street/Sidewalk  Loud Music/Party  Street/Sidewalk        11236            AVENUE J         AVENUE J     EAST 80 STREET  EAST 81 STREET                   NaN                   NaN     BLOCKFACE  BROOKLYN      NaN      Precinct    Open  10/31/2013 08:30:36 AM                            NaN     18 BROOKLYN  BROOKLYN                   1008937.0                    170310.0        Unspecified     BROOKLYN  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.634104 -73.911055  (40.634103775951736, -73.91105541883589)\n",
       "49     26595553  10/31/2013 12:05:10 AM  10/31/2013 02:43:43 AM   NYPD  New York City Police Department  Noise - Street/Sidewalk      Loud Talking  Street/Sidewalk        11225  25 LEFFERTS AVENUE  LEFFERTS AVENUE  WASHINGTON AVENUE  BEDFORD AVENUE                   NaN                   NaN       ADDRESS  BROOKLYN      NaN      Precinct  Closed  10/31/2013 08:05:10 AM         10/31/2013 01:29:29 AM     09 BROOKLYN  BROOKLYN                    995366.0                    180388.0        Unspecified     BROOKLYN  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.661793 -73.959934    (40.6617931276793, -73.95993363978067)\n",
       "109    26594653  10/30/2013 11:26:32 PM  10/31/2013 12:18:54 AM   NYPD  New York City Police Department  Noise - Street/Sidewalk  Loud Music/Party  Street/Sidewalk        11222                 NaN              NaN                NaN             NaN         DOBBIN STREET         NORMAN STREET  INTERSECTION  BROOKLYN      NaN      Precinct  Closed  10/31/2013 07:26:32 AM         10/31/2013 12:18:54 AM     01 BROOKLYN  BROOKLYN                    996925.0                    203271.0        Unspecified     BROOKLYN  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.724600 -73.954271  (40.724599563793525, -73.95427134534344)\n",
       "236    26591992  10/30/2013 10:02:58 PM  10/30/2013 10:23:20 PM   NYPD  New York City Police Department  Noise - Street/Sidewalk      Loud Talking  Street/Sidewalk        11218       DITMAS AVENUE    DITMAS AVENUE                NaN             NaN                   NaN                   NaN       LATLONG  BROOKLYN      NaN      Precinct  Closed  10/31/2013 06:02:58 AM         10/30/2013 10:23:20 PM     01 BROOKLYN  BROOKLYN                    991895.0                    171051.0        Unspecified     BROOKLYN  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.636169 -73.972455   (40.63616876563881, -73.97245504682485)\n",
       "370    26594167  10/30/2013 08:38:25 PM  10/30/2013 10:26:28 PM   NYPD  New York City Police Department  Noise - Street/Sidewalk  Loud Music/Party  Street/Sidewalk        11218    126 BEVERLY ROAD     BEVERLY ROAD      CHURCH AVENUE   EAST 2 STREET                   NaN                   NaN       ADDRESS  BROOKLYN      NaN      Precinct  Closed  10/31/2013 04:38:25 AM         10/30/2013 10:26:28 PM     12 BROOKLYN  BROOKLYN                    990144.0                    173511.0        Unspecified     BROOKLYN  Unspecified   Unspecified   Unspecified  Unspecified         Unspecified    Unspecified  Unspecified  Unspecified  Unspecified                N                           NaN          NaN                  NaN                   NaN                 NaN                      NaN       NaN                    NaN             NaN             NaN                 NaN  40.642922 -73.978762    (40.6429222774404, -73.97876175474585)"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "is_noise = complaints['Complaint Type'] == \"Noise - Street/Sidewalk\"\n",
    "in_brooklyn = complaints['Borough'] == \"BROOKLYN\"\n",
    "complaints[is_noise & in_brooklyn][:5]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Or if we just wanted a few columns:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Complaint Type</th>\n",
       "      <th>Borough</th>\n",
       "      <th>Created Date</th>\n",
       "      <th>Descriptor</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>10/31/2013 12:30:36 AM</td>\n",
       "      <td>Loud Music/Party</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>10/31/2013 12:05:10 AM</td>\n",
       "      <td>Loud Talking</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>109</th>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>10/30/2013 11:26:32 PM</td>\n",
       "      <td>Loud Music/Party</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>236</th>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>10/30/2013 10:02:58 PM</td>\n",
       "      <td>Loud Talking</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>370</th>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>10/30/2013 08:38:25 PM</td>\n",
       "      <td>Loud Music/Party</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>378</th>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>10/30/2013 08:32:13 PM</td>\n",
       "      <td>Loud Talking</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>656</th>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>10/30/2013 06:07:39 PM</td>\n",
       "      <td>Loud Music/Party</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1251</th>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>10/30/2013 03:04:51 PM</td>\n",
       "      <td>Loud Talking</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5416</th>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>10/29/2013 10:07:02 PM</td>\n",
       "      <td>Loud Talking</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5584</th>\n",
       "      <td>Noise - Street/Sidewalk</td>\n",
       "      <td>BROOKLYN</td>\n",
       "      <td>10/29/2013 08:15:59 PM</td>\n",
       "      <td>Loud Music/Party</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               Complaint Type   Borough            Created Date        Descriptor\n",
       "31    Noise - Street/Sidewalk  BROOKLYN  10/31/2013 12:30:36 AM  Loud Music/Party\n",
       "49    Noise - Street/Sidewalk  BROOKLYN  10/31/2013 12:05:10 AM      Loud Talking\n",
       "109   Noise - Street/Sidewalk  BROOKLYN  10/30/2013 11:26:32 PM  Loud Music/Party\n",
       "236   Noise - Street/Sidewalk  BROOKLYN  10/30/2013 10:02:58 PM      Loud Talking\n",
       "370   Noise - Street/Sidewalk  BROOKLYN  10/30/2013 08:38:25 PM  Loud Music/Party\n",
       "378   Noise - Street/Sidewalk  BROOKLYN  10/30/2013 08:32:13 PM      Loud Talking\n",
       "656   Noise - Street/Sidewalk  BROOKLYN  10/30/2013 06:07:39 PM  Loud Music/Party\n",
       "1251  Noise - Street/Sidewalk  BROOKLYN  10/30/2013 03:04:51 PM      Loud Talking\n",
       "5416  Noise - Street/Sidewalk  BROOKLYN  10/29/2013 10:07:02 PM      Loud Talking\n",
       "5584  Noise - Street/Sidewalk  BROOKLYN  10/29/2013 08:15:59 PM  Loud Music/Party"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "complaints[is_noise & in_brooklyn][['Complaint Type', 'Borough', 'Created Date', 'Descriptor']][:10]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 3.2 A digression about numpy arrays"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "On the inside, the type of a column is `pd.Series`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1\n",
       "1    2\n",
       "2    3\n",
       "dtype: int64"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Series([1,2,3])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "and pandas Series are internally numpy arrays. If you add `.values` to the end of any `Series`, you'll get its internal numpy array"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3])"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.array([1,2,3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3])"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Series([1,2,3]).values"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "So this binary-array-selection business is actually something that works with any numpy array:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "arr = np.array([1,2,3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ True, False,  True])"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr != 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 3])"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr[arr != 2]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 3.3 So, which borough has the most noise complaints?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "MANHATTAN        917\n",
       "BROOKLYN         456\n",
       "BRONX            292\n",
       "QUEENS           226\n",
       "STATEN ISLAND     36\n",
       "Unspecified        1\n",
       "Name: Borough, dtype: int64"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "is_noise = complaints['Complaint Type'] == \"Noise - Street/Sidewalk\"\n",
    "noise_complaints = complaints[is_noise]\n",
    "noise_complaints['Borough'].value_counts()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It's Manhattan! But what if we wanted to divide by the total number of complaints, to make it make a bit more sense? That would be easy too:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "noise_complaint_counts = noise_complaints['Borough'].value_counts()\n",
    "complaint_counts = complaints['Borough'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "BRONX            0.014833\n",
       "BROOKLYN         0.013864\n",
       "MANHATTAN        0.037755\n",
       "QUEENS           0.010143\n",
       "STATEN ISLAND    0.007474\n",
       "Unspecified      0.000141\n",
       "Name: Borough, dtype: float64"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "noise_complaint_counts / complaint_counts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Oops, why was that zero? That's no good. This is because of integer division in Python 2. Let's fix it, by converting `complaint_counts` into an array of floats."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "BRONX            0.014833\n",
       "BROOKLYN         0.013864\n",
       "MANHATTAN        0.037755\n",
       "QUEENS           0.010143\n",
       "STATEN ISLAND    0.007474\n",
       "Unspecified      0.000141\n",
       "Name: Borough, dtype: float64"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "noise_complaint_counts / complaint_counts.astype(float)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x128067df0>"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    },
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24CADx89dVXKioq0osvvqgZM2bopptuMrskABZRXV2toqIiFRcXa/Xq1WaXA1gaQQ8AIOlkwNu5c6eKiopUU1OjMWPGaNKkSfrOd75jdmkAAlhDQ4OKi4u1fft2HTx4UOnp6Ro7dqwuvvhis0sDLI2gBwDQs88+q88//1wJCQlKTk7mDRiAbyw/P19FRUWqr6/Xtddeq2uvvVYrVqzQmjVrzC4N6BOYPA0A0D/+8Q+FhYWpqqpK//mf/+nebxiGbDab/vSnP5lYHYBAtGHDBsXHx2vu3LkaPny4JHW5qyKA84cRPQAAAJxzzc3Nev/991VUVKTGxkZde+21Kigo0Lp168wuDegTCHoAAAA4r+rq6lRUVKSioiK1t7fr6quv1s9//nOzywIsjaAHAACAc66iokLx8fFd9h8+fFhFRUX62c9+ZkJVQN8RZHYBAAAAsJ4NGzZ43R8dHU3IA74FBD0AAAAAsBimbgIAAOCcu/POO3XFFVec8fjChQu/xWqAvofHKwAAAOCci4yM1LRp08wuA+izCHoAAAA45/r166eRI0eaXQbQZ7FGDwAAAOfc4MGDzS4B6NNYowcAAIBzbs+ePXI6nRo0aJAkqaCgQB988IGcTqdmzpypiIgIkysErI0RPQAAAJxzzz//vEJCTq4S+vjjj/Xyyy9r3LhxCg8P1x//+EeTqwOsj6AHAACAc87lcrlH7YqLi5WSkqJrrrlG//Iv/6Lq6mqTqwOsj6AHAACAc87lcqmzs1OStGvXLo0aNcrjGIDzi7tuAgAA4Jy77rrr9MQTT2jAgAEKDQ11P1Ovurpa4eHhJlcHWB83YwEAAMB5UVFRocbGRl155ZXq16+fJOnw4cM6ceKE4uLiTK4OsDaCHgAAAABYDGv0AAAAAMBiCHoAAAAAYDEEPQAAAACwGIIeAAAAAFgMQQ8AAAAALOb/A9NyDOYB+0kOAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 1080x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "(noise_complaint_counts / complaint_counts.astype(float)).plot(kind='bar')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "So Manhattan really does complain more about noise than the other boroughs! Neat."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<style>\n",
    "    @font-face {\n",
    "        font-family: \"Computer Modern\";\n",
    "        src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');\n",
    "    }\n",
    "    div.cell{\n",
    "        width:800px;\n",
    "        margin-left:16% !important;\n",
    "        margin-right:auto;\n",
    "    }\n",
    "    h1 {\n",
    "        font-family: Helvetica, serif;\n",
    "    }\n",
    "    h4{\n",
    "        margin-top:12px;\n",
    "        margin-bottom: 3px;\n",
    "       }\n",
    "    div.text_cell_render{\n",
    "        font-family: Computer Modern, \"Helvetica Neue\", Arial, Helvetica, Geneva, sans-serif;\n",
    "        line-height: 145%;\n",
    "        font-size: 130%;\n",
    "        width:800px;\n",
    "        margin-left:auto;\n",
    "        margin-right:auto;\n",
    "    }\n",
    "    .CodeMirror{\n",
    "            font-family: \"Source Code Pro\", source-code-pro,Consolas, monospace;\n",
    "    }\n",
    "    .text_cell_render h5 {\n",
    "        font-weight: 300;\n",
    "        font-size: 22pt;\n",
    "        color: #4057A1;\n",
    "        font-style: italic;\n",
    "        margin-bottom: .5em;\n",
    "        margin-top: 0.5em;\n",
    "        display: block;\n",
    "    }\n",
    "    \n",
    "    .warning{\n",
    "        color: rgb( 240, 20, 20 )\n",
    "        }  "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
